package com.ch.android.lookforkotlinv2

import android.app.Application
import android.util.Log
import com.ch.android.baselib.SpUtil
import com.ch.android.baselib.SpUtil.setSessionId

/**
 * Author: conghao
 * Date: 2024/1/23 15:15
 * Description: MyApp
 */
class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        SpUtil.initialize(this)

        var runTimes = SpUtil.getSP().getInt("app_run_times", 0)
        SpUtil.getSP().edit().putInt("app_run_times" , ++runTimes).apply()
        runTimes = SpUtil.getSP().getInt("app_run_times", 0)
        Log.d("MyApp", "runTimes: $runTimes")

    }
}